package com.lfx.concurrent.interrupted;

/**
 * @author 李逢喜
 * create 2021/7/22
 */
public class InterruptedThreadMain {

    public static void main(String[] args) throws InterruptedException {
        InterruptedThread3 interruptedThread=new InterruptedThread3();
        interruptedThread.start();
        Thread.sleep(10);
        //终端线程
        interruptedThread.interrupt();
        //重置中断线程状态
//        Thread.interrupted();
        Thread.sleep(7);
        System.out.println("main中断状态检查-1：" + interruptedThread.isInterrupted());
        System.out.println("main中断状态检查-2：" + interruptedThread.isInterrupted());
        System.exit(0);
    }
}
